home *** CD-ROM | disk | FTP | other *** search
- global gProjectorInUse, gPhotos, gCurrentGroup, gCurrentGroupPICTlist, gCurrentPict, gFixPal, gPictSprite, gCenterH, gCenterV, gZoomDirection, gInterfaceSprite
-
- on startMovie
- if the machineType <> 256 then
- if voidp(gFixPal) then
- openXLib("WRONGPAL.XOB")
- set gFixPal to FixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageTop)
- end if
- end if
- if the movie contains "Photos.DIR" then
- cursor(4)
- setGPhoto()
- activate(47, "Interface", 1, 0, 320, 454, EMPTY, EMPTY, EMPTY)
- prepImage()
- cursor(-1)
- when mouseDown then checkClick
- else
- if gProjectorInUse < 1 then
- set the centerStage to 1
- if the colorDepth < 8 then
- set the colorDepth to 8
- if the colorDepth < 8 then
- set x to "Excuse me, but this program requires at least 256 colors to run properly."
- set x to x & RETURN & RETURN & "Please change your monitor configurations, and try again."
- alert(x)
- if not (the shiftDown) then
- halt()
- exit
- end if
- end if
- end if
- if the machineType <> 256 then
- end if
- set gProjectorInUse to 1
- end if
- set the itemDelimiter to ","
- when mouseDown then nothing
- end if
- when keyDown then checkKey
- end
-
- on prepImage
- setGlobals()
- showImage()
- setDimensions()
- end
-
- on patchpal
- if the machineType <> 256 then
- gFixPal(mPatchIt)
- end if
- end
-
- on getWhichPICT
- set gCurrentGroupPICTlist to getAt(gPhotos, gCurrentGroup)
- set gCurrentPict to checkRangeWrap(gCurrentPict, 2, count(gCurrentGroupPICTlist))
- set whichPICT to getAt(gCurrentGroupPICTlist, gCurrentPict)
- return whichPICT
- end
-
- on getNextPICT
- set gCurrentGroupPICTlist to getAt(gPhotos, gCurrentGroup)
- set whichPICT to checkRangeWrap(gCurrentPict + 1, 2, count(gCurrentGroupPICTlist))
- set whichPICT to getAt(gCurrentGroupPICTlist, whichPICT)
- return whichPICT
- end
-
- on getPreviousPICT
- set gCurrentGroupPICTlist to getAt(gPhotos, gCurrentGroup)
- set whichPICT to checkRangeWrap(gCurrentPict - 1, 2, count(gCurrentGroupPICTlist))
- set whichPICT to getAt(gCurrentGroupPICTlist, whichPICT)
- return whichPICT
- end
-
- on showImage
- set whichPICT to getWhichPICT()
- superPalette(whichPICT)
- set theRectWidth to the width of cast whichPICT / 2
- set theRectHeight to the height of cast whichPICT / 2
- set theRectLeft to 320 - (theRectWidth / 2)
- set theRectTop to 240 - (theRectHeight / 2)
- activate(1, whichPICT, 1, 0, theRectLeft, theRectTop, "stretch to:", theRectLeft + theRectWidth, theRectTop + theRectHeight)
- puppetTransition(1, 0, 5)
- updateStage()
- go(the frame)
- set whichPICT to getNextPICT()
- preLoad(whichPICT)
- set whichPICT to getPreviousPICT()
- preLoad(whichPICT)
- end
-
- on advanceImage
- deactivate([1])
- puppetTransition(1, 0, 4)
- updateStage()
- showImage()
- when mouseDown then checkClick
- end
-
- on superPalette whichPICT
- deactivate([1])
- puppetTransition(5, 0, 12)
- updateStage()
- doPalette(the palette of cast whichPICT)
- patchpal()
- go(the frame)
- end
-
- on doPalette whichPalette
- puppetPalette(whichPalette)
- updateStage()
- end
-
- on checkClick
- if the mouseV < the top of sprite gInterfaceSprite then
- if the optionDown then
- zoomSprite(gPictSprite, the clickLoc, the locH of sprite gPictSprite, the locV of sprite gPictSprite, -1)
- else
- zoomSprite(gPictSprite, the clickLoc, the locH of sprite gPictSprite, the locV of sprite gPictSprite, 1)
- end if
- startTimer()
- else
- checkInterfaceClick(the mouseH)
- end if
- end
-
- on checkKey
- set userKey to the key
- set userKeyCode to the keyCode
- if developersKey() then
- if userKey = "8" then
- set the colorDepth to 8
- else
- if userKey = "6" then
- set the colorDepth to 16
- end if
- end if
- exit
- else
- if commandKey() then
- if userKey = "Q" then
- pass()
- halt()
- else
- pass()
- exit
- end if
- else
- if userKeyCode = 27 then
- halt()
- else
- if (userKey = "?") or (userKey = "/") then
- exit
- else
- if userKey = "S" then
- set the soundEnabled to not (the soundEnabled)
- exit
- else
- if (userKey >= "0") and (userKey <= "9") then
- set the soundEnabled to 1
- set the soundLevel to value(userKey)
- set newVolume to value(userKey) * 28
- set the volume of sound 1 to newVolume
- set the volume of sound 2 to newVolume
- exit
- else
- if userKeyCode = 29 then
- exit
- else
- if userKeyCode = 28 then
- exit
- else
- if userKeyCode = 30 then
- exit
- else
- if userKeyCode = 31 then
- exit
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- dontPassEvent()
- end
-